<?php

class CCUUtility
{
    public static function calcCCU()
    {
        CCUModel::calcCCU();
    }

    public static function getCCU()
    {
        $result = array();

        $ccu = CCUModel::getCCU();
        $result['time_start'] = strtotime($ccu[0]['time']);
        foreach($ccu as $e)
        {
            $result['vals'][] = (int) $e['val'];
        }

        return $result;
    }
}
